package com.coding.service.impl;

import com.coding.base.pojo.BaseModel;
import com.coding.dao.ShopDao;
import com.coding.pojo.Shop;
import com.coding.service.ShopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @auther wangchenghao
 * @date 2020/9/12
 **/
@Service
public class ShopImpl implements ShopService {
    @Autowired
    ShopDao shopDao;
    @Override
    public void getShoplist(BaseModel model) throws Exception {
        List<Shop> shopList=shopDao.selectAll();
        if (shopList!=null){
            model.setSucceed("查询商品成功",shopList);
        }else {
            model.setFailure("查询商品失败");
        }
    }
}
